package com.ruoyi.quantization.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.quantization.mapper.SysMoralityMapper;
import com.ruoyi.quantization.domain.SysMorality;
import com.ruoyi.quantization.service.ISysMoralityService;

/**
 * 品德Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-02
 */
@Service
public class SysMoralityServiceImpl implements ISysMoralityService 
{
    @Autowired
    private SysMoralityMapper sysMoralityMapper;

    /**
     * 查询品德
     * 
     * @param moralityId 品德主键
     * @return 品德
     */
    @Override
    public SysMorality selectSysMoralityByMoralityId(Long moralityId)
    {
        return sysMoralityMapper.selectSysMoralityByMoralityId(moralityId);
    }

    /**
     * 查询品德列表
     * 
     * @param sysMorality 品德
     * @return 品德
     */
    @Override
    public List<SysMorality> selectSysMoralityList(SysMorality sysMorality)
    {
        return sysMoralityMapper.selectSysMoralityList(sysMorality);
    }

    /**
     * 新增品德
     * 
     * @param sysMorality 品德
     * @return 结果
     */
    @Override
    public int insertSysMorality(SysMorality sysMorality)
    {
        return sysMoralityMapper.insertSysMorality(sysMorality);
    }

    /**
     * 修改品德
     * 
     * @param sysMorality 品德
     * @return 结果
     */
    @Override
    public int updateSysMorality(SysMorality sysMorality)
    {
        return sysMoralityMapper.updateSysMorality(sysMorality);
    }

    /**
     * 批量删除品德
     * 
     * @param moralityIds 需要删除的品德主键
     * @return 结果
     */
    @Override
    public int deleteSysMoralityByMoralityIds(Long[] moralityIds)
    {
        return sysMoralityMapper.deleteSysMoralityByMoralityIds(moralityIds);
    }

    /**
     * 删除品德信息
     * 
     * @param moralityId 品德主键
     * @return 结果
     */
    @Override
    public int deleteSysMoralityByMoralityId(Long moralityId)
    {
        return sysMoralityMapper.deleteSysMoralityByMoralityId(moralityId);
    }


    /**
     * 查询品德通过学号
     *
     * @param moralityStdId 品德主键
     * @return 品德
     */
    public SysMorality selectSysMoralityByMoralityStdId(String moralityStdId)
    {
        return sysMoralityMapper.selectSysMoralityByMoralityStdId(moralityStdId);
    }
}
